package com.xyz.messagehelper.ui.activity

import android.app.ProgressDialog
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import com.xyz.messagehelper.utils.SharePreferenceUtils
import com.xyz.messagehelper.utils.Utils
import kotlin.concurrent.thread

@Suppress("DEPRECATION")
abstract class BaseActivity : AppCompatActivity() {

    val progressDialog by lazy {
        ProgressDialog(this)
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(getLayoudResId())
        init()
    }

    open fun init() {

    }

    abstract fun getLayoudResId(): Int


    fun showProgressDialog(message: String) {
        progressDialog.setMessage(message)
        progressDialog.show()
    }

    fun dismissProgressDialog() {
        progressDialog.dismiss()
    }
}